#include "Multimedia.h"
#include<iomanip>
#include <fstream>


Multimedia::Multimedia(string t, int y, string mt)
{
	title=t;
	year=y;
	media_type=mt;
}

Multimedia::Multimedia()
{
	title="";
	year=0;
	media_type="";
}


ostream & operator <<(ostream& out, Multimedia &m)
{
	out << m.title;
	out << m.year;
	out << m.media_type;
	return out;
}

istream & operator >>(istream& in, Multimedia &m)
{
	in >> m.title;
	in >> m.year;
	in >> m.media_type;
	return in;
}

bool Multimedia::operator==(Multimedia &obj)
{
	if( (title.compare(obj.title) && media_type.compare(obj.media_type)) == 0)
	{
		return true;

	}
	else
	{ 
		return false;
	}
}

bool operator <(Multimedia &obj1, Multimedia &obj2)
{
	return obj1.title < obj2.title;
}